home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1995 April / Internet Tools.iso / dos_win / winsock / maillist / 94-03.Z / 94-03 / text0336.txt < prev    next >
Encoding:
Text File  |  1994-03-30  |  2.2 KB  |  47 lines

  1. I am porting a Unix sockets application to Winsock.  The messages exchanged 
  2. among the various programs constituting the application are C structures.
  3. read() is used by the Unix processes to retrieve data from the socket buffers;
  4. it reads a certain amount of data from the buffer as specified in one of its
  5. parameters.  One only needs to give it the size of the structure and it will
  6. retrieve the whole thing.  read() is not supported with Winsock; you must 
  7. user recv(). recv() read the next message in the queue.  Apparently it
  8. decides that a message ends when it runs into a '\0' char.  Thus, everything
  9. following the first string in the structure is left behind in the buffer.
  10. Obviously, this is creating some serious problems for me.
  11.  
  12. Can anyone tell me if this is in fact the way that recv() works, and if there
  13. is an elegant solution provided by Winsock?
  14.  
  15. -- 
  16. Gary Hall                  | Voice (604) 291-3208 | INTERNET: hall@cs.sfu.ca
  17. Centre for Systems Science | Fax   (604) 291-4424 | 
  18. Simon Fraser University    |               
  19. Burnaby, B.C.  V5A 1S6     |       
  20. From news@bigblue.oit.unc.edu Thu Mar 24 21:23:37 1994
  21. Received: from bigblue.oit.unc.edu by SunSITE.Unc.EDU (5.65c+IDA/FvK-1.07) with SMTP
  22.           id AA25057; Thu, 24 Mar 1994 18:12:28 -0500
  23. Received: by bigblue.oit.unc.edu (AIX 3.2/UCB 5.64/4.03)
  24.           id AA13974; Thu, 24 Mar 1994 17:51:10 -0500
  25. Received: from GATEWAY by bigblue with netnews
  26.     for winsock@sunsite.unc.edu (winsock@sunsite.unc.edu)
  27. To: winsock@sunsite.unc.edu
  28. Date: Thu, 24 Mar 1994 21:23:37 GMT
  29. From: Whippet@psu.edu (Michael A. Grassi)
  30. Message-Id: <Whippet.13.2D9204D9@psu.edu>
  31. Organization: Penn State University
  32. Sender: ses
  33. Subject: Winsock/Packet Driver Question
  34.  
  35. I am running Winsock 1.0 rev B beta #2 over a packet driver for the Intel 
  36. Ethernet Express and Winpkt.  I also use a few WATTCP apps for dos like tn3270 
  37. and ftp.  The thing is I have to disable Winsock to run these apps, and I 
  38. don't really like to shut all my Winsock apps down everytime I need to use the 
  39. WATTCP stuff.  Is there a way I can run both at the same time?  I tried 
  40. loading 2 packet drivers at different vectors, and that caused all sorts od 
  41. probs in Windows.  Does anybody have a suggestion?  E-mail me at 
  42. Whippet@psu.edu.  TIA...
  43.  
  44. --Michael
  45.   Whippet@psu.edu
  46.  
  47.